package org.example.rowing.enums;

public enum GenderEnum {
    MALE("男子"),
    FEMALE("女子"),
    MIXED("混合");

    private final String displayName;

    GenderEnum(String displayName) {
        this.displayName = displayName;
    }

    public String getDisplayName() {
        return displayName;
    }

    public static GenderEnum fromDisplayName(String displayName) {
        for (GenderEnum gender : values()) {
            if (gender.displayName.equals(displayName)) {
                return gender;
            }
        }
        throw new IllegalArgumentException("Invalid display name: " + displayName);
    }
}
